package com.redball;

public class Line
{
	private int _startX;
	private int _startY;
	private int _endX;
	private int _endY;

	public Line(int startX, int startY, int endX, int endY)
	{
		if (startX < endX)
		{
			_startX = startX;
			_startY = startY;
			_endX = endX;
			_endY = endY;
		} else
		{
			_startX = endX;
			_startY = endY;
			_endX = startX;
			_endY = startY;
		}
	}

	public int getStartX()
	{
		return _startX;
	}

	public int getStartY()
	{
		return _startY;
	}

	public int getEndX()
	{
		return _endX;
	}

	public int getEndY()
	{
		return _endY;
	}
	
	public double getDX(){
		double dX = this.getEndX() - this.getStartX();
		return dX;
	}
	
	public double getDY(){
		double dY = this.getEndY() - this.getStartY();
		return dY;
	}

}